<template>
  <div id="app">
    <Header :key="updateKey"  @updateKeyFn="updateKeyFn" />
      <router-view @updateKeyFn="updateKeyFn"/>
      <Login @updateKeyFn="updateKeyFn"/>
    <Footer />
    <div class="top"><a href="#">Top</a></div>
      <Toast v-show="$store.state.ToastShow" />
  </div>
</template>

<script>
import Header from "@/components/Header.vue";
import Footer from "@/components/Footer.vue";
import Login from "@/components/Login.vue"; 
import Toast from "@/components/Toast.vue";

export default {
  data() {
    return{
 updateKey : 0
    }
  },
  components: {
    Header,
    Footer,
    Login,
    Toast
  },
  methods:{
     updateKeyFn(){
      // console.log(query);
      this.updateKey++;
    }
  }
};
</script>

<style lang="less">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  background-color: #eee;
}
* {
  margin: 0;
  padding: 0;
  list-style: none;
  text-decoration: none;
}
.top {
  position: fixed;
  width: 30px;
  height: 30px;
  right: 20%;
  bottom: 20%;
  border: 1px solid #ccc;
}
</style>
